package com.cristina.attention.service;

import com.cristina.attention.entity.Group;
import com.cristina.attention.entity.GroupMember;
import com.cristina.attention.mp.base.BaseService;

import java.util.List;
import java.util.Set;

/**
 * @author by Attention
 * @Classname GroupMemberService
 * @Date 2021/12/6
 */
public interface GroupMemberService extends BaseService<GroupMember> {

    /**
     * 查询用户所在的所有群聊
     * @param userId
     * @return
     */
    List<Group> findGroupBelonging(Long userId);

    /**
     * 根据群id 获取群成员
     *
     * @param groupId
     * @param userId
     * @return
     */
    List<GroupMember> findGroupMemberByGroupId(Long groupId, Long userId);

    /**
     * 根据群id 获取群成员
     *
     * @param groupIds
     * @return
     */
    List<GroupMember> findGroupMemberByGroupId(Set<Long> groupIds);
}
